﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using Commons;
using Business.Entities;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;

public partial class OperaEntry_MasterPage : System.Web.UI.MasterPage
{
    protected DataSet menuInfo;
    protected static UserInfo userInfo;

    protected void Page_Load(object sender, EventArgs e)
    {
        
        menuInfo = new DataSet();
        XmlReader reader = XmlReader.Create(System.AppDomain.CurrentDomain.BaseDirectory + @"OperaEntry\OperaMenu.xml");
        menuInfo.ReadXml(reader);

        this.MenuList.DataSource = menuInfo;
        this.MenuList.DataBind();
        OperaEntry_MasterPage.userInfo = new UserInfo();
        OperaEntry_MasterPage.userInfo.UserName = "Unlogined";
        if (OperaEntry_MasterPage.userInfo != null)
        {
            this.User.Text = userInfo.UserName;
            this.LoginTime.Text = DateTime.Now.ToString("yyyy/MM/dd hh:mm:ss");
        }
    }
}
